cmake_minimum_required(VERSION 2.8)

add_definitions(-std=c++11)


project(QinChat)

aux_source_directory(./ DIR_SRC)
aux_source_directory(./util Uil_SRC)
aux_source_directory(./net NET_SRC)
include_directories(./net)

include_directories(./core)
aux_source_directory(./core CORE_SRC)

include_directories(./chat)
aux_source_directory(./chat CHAT_SRC)

include_directories(./app)
aux_source_directory(./app APP_SRC)

SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")


message(${Uil_SRC})
add_executable(QinChat ${DIR_SRC} ${Uil_SRC} ${NET_SRC} ${CORE_SRC} ${CHAT_SRC} ${APP_SRC})
TARGET_LINK_LIBRARIES( QinChat
pthread
)
